﻿using ACS.SPiiPlusNET;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media.Media3D;

namespace Company.Hardware.Acs
{
    public class CompanyHardwareAcsModule : IModule
    {
        public void OnInitialized(IContainerProvider containerProvider)
        {
      
        }
        //注册到IOC容器
        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            //注册Api单例
            if (!containerRegistry.IsRegistered<Api>())
            {
                containerRegistry.RegisterSingleton<Api>();
            }
            //注册Acs控制器
            if (!containerRegistry.IsRegistered<IAcsController>())
            {
                containerRegistry.RegisterSingleton<IAcsController, AcsController>();//注册Acs控制器到IOC容器中//单例
            }
            //注册Acs控制器提供者
            if (!containerRegistry.IsRegistered<AcsControllerProvider>())
            {
                containerRegistry.RegisterSingleton<AcsControllerProvider>();//注册Acs控制器到IOC容器中//单例
            }
        }
    }
}
